﻿//苏州

//电子图
define([
    "dojo/_base/declare"
    , "esri/layers/TiledMapServiceLayer"
    , "esri/SpatialReference"
    , "esri/geometry/Extent"
    , "esri/layers/TileInfo"
], function (declare
    , TiledMapServiceLayer
    , SpatialReference
    , Extent
    , TileInfo) {
    var Sz_vec_c = declare([TiledMapServiceLayer], {
        constructor: function () {
            this.spatialReference = new SpatialReference({wkid: 4490});
            this.initialExtent = (this.fullExtent = new Extent(  118.81209038650009,
                30.177509041380798,
                122.50917792350008,
                32.582746826619264,
                this.spatialReference));
            this.tileInfo = new TileInfo({
                "rows": 256,
                "cols": 256,
                "compressionQuality": 0,
                "origin": {
                    "x":-400.0,
                    "y": 399.9999999999998
                },
                "spatialReference": {
                    "wkid": 4490
                },
                "lods": [
                     {"level": 0, "resolution": 0.002746582031250001, "scale": 1154287.4728857423}
                    , {"level": 1, "resolution":  0.0024746394460634915, "scale":  1040000}
                    , {"level": 2, "resolution":  0.002165309515305555, "scale": 910000}
                    , {"level": 3, "resolution": 0.0018559795845476186, "scale":780000}
                    , {"level": 4, "resolution": 0.001546649653789682, "scale": 650000}
                    , {"level": 5, "resolution": 0.0012373197230317458, "scale": 520000}
                    , {"level": 6, "resolution": 6.866455078125002E-4, "scale":288571.8682214356}
                    , {"level": 7, "resolution": 3.433227539062501E-4, "scale": 144285.9341107178}
                    , {"level": 8, "resolution": 1.7166137695312505E-4, "scale":72142.9670553589}
                    , {"level": 9, "resolution": 8.583068847656253E-5, "scale":36071.48352767945}
                    , {"level": 10, "resolution":4.2915344238281264E-5, "scale": 18035.741763839724}
                    , {"level": 11, "resolution": 2.1457672119140632E-5, "scale": 9017.870881919862}
                    , {"level": 12, "resolution": 1.0728836059570316E-5, "scale": 4508.935440959931}
                    , {"level": 13, "resolution": 5.364418029785158E-6, "scale": 2254.4677204799655}
                    , {"level": 14, "resolution":2.6822090148925794E-6, "scale": 1127.233860239983}
                ]
            });
            this.loaded = true;
            this.onLoad(this);
        },
        getTileUrl: function (level, row, col) {
            return `http://221.224.13.15:8181/arcgis/rest/services/Environment/HBDZDT_2020/MapServer/tile/${level}/${row}/${col}`;
        }
    });
    return Sz_vec_c;
});